package me.leiusual.sharing.api.model.orderconfirm

import me.leiusual.sharing.api.model.Address

data class DefaultAddress(
    val id: Long,
    val createTime: String,
    val linkMan: String,
    val contactPhone: String,
    val addressType: String,
    val county: County,
    val detailAddress: String,
    val defaulted: Boolean,
    val postcode: Any?,
    val store: Any?,
    val fullAddress: String
) {

  fun toAddress(): Address {
    return Address(
        id,
        linkMan,
        contactPhone,
        null,
        county.id,
        county.fullName,
        detailAddress,
        true,
        null
    )
  }
}